function output = changeclass(classname, input)
    switch classname
        case 'double'
            output = im2double(input);
        case 'uint8'
            output = im2uint8(input);
        case 'uint16'
            output = im2uint16(input);
        otherwise
            disp(classname)
            error('Unsupported classname.')
    end
end
